﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace IKE_painter
{
    //Struktura Termu kterou mám uloženou ve WEE
    //#region GAL

    //public class Term
    //{
    //    public Int32 TermID { get; set; } //ID of RootTerm
    //    public Int32 RootID { get; set; } //ID of RootTerm
    //    public Int32 WordID { get; set; } //ID of word(by max)
    //    public List<TermChild> Child = new List<TermChild>(); //Childs

    //    public string Name { get; set; } //Name of Term
    //    public string URL { get; set; }  //URL to Wiki-page
    //    public string Text { get; set; } //Texts about Term

    //    public Bubble Bubble { get; set; } //Settings of displayed Bubble
    //    public Line Line { get; set; } //Settings of displayed Line to Root Term
    //    public Boolean Visible { get; set; } //Visibility of this term
    //}

    //public class Bubble
    //{
    //    public Color Color { get; set; }  //Color of Term-buble
    //    public Location Location { get; set; } //Location in graph
    //    public Double Size { get; set; } //Size of Term-buble
    //}

    //public class Line
    //{
    //    public Color Color { get; set; } //Color line to RootTerm
    //    public Double Size { get; set; } //Size of line to RootTerm
    //}

    //public class TermChild
    //{
    //    public Int32 ID { get; set; } //ID of termChild
    //    public Double SizeLine { get; set; }
    //}

    //#endregion GAL




    public class ResultWord : IComparable<ResultWord>
    {
        public String wordID { get; set; }
        public String weight { get; set; }
        public String pageID { get; set; }
        public String pageName { get; set; }

        public int CompareTo(ResultWord obj)
        {
            return (Convert.ToInt32(weight)).CompareTo(Convert.ToInt32(obj.weight));
        }
    }


    public class PageFrom
    {
        public Int32 ID { get; set; }
        public String pageName { get; set; }
        public List<PageTo> PageTo = new List<PageTo>();
    }

    public class PageTo
    {
        public Int32 ID { get; set; }
        public Int32 Count { get; set; }
    }


    public class Node
    {
        public int Name; 
        public int Component;

        public Node(int argID) //Constructor
        {
            Name = argID;
            Component = -1;
        }

        public int compareTo(Node argNode)
        {
            return argNode == this ? 0 : -1;
        }
    }

    public class Edge
    {
        public Node From, To; 
        public int Weight; 
        public int Component;

        public Edge(Node argFrom, Node argTo, int argWeight) //Constructor
        {
            From = argFrom;
            To = argTo;
            Weight = argWeight;
            Component = -1;
        }

        public int compareTo(Edge argEdge)
        {
            return Weight - argEdge.Weight;
        }
    }

}